package com.crm.custinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.custinfo.mapper.UserAddmustDetailMapper;
import com.crm.custinfo.domain.UserAddmustDetail;
import com.crm.custinfo.service.IUserAddmustDetailService;

/**
 * 用户操作记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-09
 */
@Service
public class UserAddmustDetailServiceImpl implements IUserAddmustDetailService 
{
    @Autowired
    private UserAddmustDetailMapper userAddmustDetailMapper;

    /**
     * 查询用户操作记录
     * 
     * @param id 用户操作记录主键
     * @return 用户操作记录
     */
    @Override
    public UserAddmustDetail selectUserAddmustDetailById(Long id)
    {
        return userAddmustDetailMapper.selectUserAddmustDetailById(id);
    }

    /**
     * 查询用户操作记录列表
     * 
     * @param userAddmustDetail 用户操作记录
     * @return 用户操作记录
     */
    @Override
    public List<UserAddmustDetail> selectUserAddmustDetailList(UserAddmustDetail userAddmustDetail)
    {
        return userAddmustDetailMapper.selectUserAddmustDetailList(userAddmustDetail);
    }

    /**
     * 新增用户操作记录
     * 
     * @param userAddmustDetail 用户操作记录
     * @return 结果
     */
    @Override
    public int insertUserAddmustDetail(UserAddmustDetail userAddmustDetail)
    {
        userAddmustDetail.setCreateTime(DateUtils.getNowDate());
        return userAddmustDetailMapper.insertUserAddmustDetail(userAddmustDetail);
    }

    /**
     * 修改用户操作记录
     * 
     * @param userAddmustDetail 用户操作记录
     * @return 结果
     */
    @Override
    public int updateUserAddmustDetail(UserAddmustDetail userAddmustDetail)
    {
        return userAddmustDetailMapper.updateUserAddmustDetail(userAddmustDetail);
    }

    /**
     * 批量删除用户操作记录
     * 
     * @param ids 需要删除的用户操作记录主键
     * @return 结果
     */
    @Override
    public int deleteUserAddmustDetailByIds(Long[] ids)
    {
        return userAddmustDetailMapper.deleteUserAddmustDetailByIds(ids);
    }

    /**
     * 删除用户操作记录信息
     * 
     * @param id 用户操作记录主键
     * @return 结果
     */
    @Override
    public int deleteUserAddmustDetailById(Long id)
    {
        return userAddmustDetailMapper.deleteUserAddmustDetailById(id);
    }
}
